package com.ccq.controller;

import com.ccq.service.RentlistService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping(value = { "front" })
public class RentlistController {
    @Autowired
    private RentlistService rentlistService;

    @ApiOperation(value="初始列表",notes = "初始列表")
    @RequestMapping(value = { "rentlist" },method = RequestMethod.POST)
    @ResponseBody
    public String rentlist(){
        String ls=rentlistService.deallist();
        return ls;
    }

    @ApiOperation(value="租房查询列表",notes = "租房查询列表")
    @RequestMapping(value = { "searchlist2" },method = RequestMethod.POST)
    @ResponseBody
    public String searchlist1(String adress,String price,String area,String type,String times,String nice){
        System.out.println(adress+" "+price+" "+area+" "+type+" "+times+" "+nice);
        String ls=rentlistService.searchlist2(adress,price,area,type,times,nice);
        return ls;
    }
}
